package com.jt.service;

import com.jt.mapper.UserMapper;
import com.jt.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public User findById(Integer id) {
        return userMapper.findById(id);
    }

    @Override
    public List<User> findByAS(User user) {
        return userMapper.findByAS(user);
    }

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public void addUser(User user) {
       userMapper.addUser(user);
    }

    @Override
    public void updateUser(User user) {
     userMapper.updateUser(user);
    }

    @Override
    public void deleteUser(User user){
        userMapper.deleteUser(user);
    }
}
